#ifndef BEAM_CPP
#define BEAM_CPP
#include "Beam.h"
#include "Renderer.h"
#include <new>
Beam::Beam(GameObject* source, GameObject* target)
{
	m_objectType = OBJECT_TYPE::BEAM;
	m_source = source;
	m_target = target;
	Position& pos = GetPosition();
	pos.x = 1;
	pos.y = 1;
	m_framesRemaining = 2;
}
Beam::~Beam(void)
{

}
void Beam::DestroyData(void)
{

}
void Beam::Copy(void* address)
{
	new (address) Beam(*this);
}
void Beam::Update(void)
{
	if (m_framesRemaining)
	{
		m_framesRemaining--;
	}
}
void Beam::Draw(void)
{
	Renderer::GetInstance().DrawObject(*this);
}
int Beam::GetObjSize(void)
{
	return sizeof(*this);
}
SDL_Texture* Beam::GetTexture(void)
{
	return 0;
}
GameObject* Beam::GetSource(void)
{
	return m_source;
}
GameObject* Beam::GetTarget(void)
{
	return m_target;
}
int Beam::GetFramesRemaining(void)
{
	return m_framesRemaining;
}
#endif